.\" Man page generated from reStructuredText.
.
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "GDAL_CONTOUR" "1" "Apr 02, 2024" "" "GDAL"
.SH NAME
gdal_contour \- Builds vector contour lines from a raster elevation model.
.SH SYNOPSIS
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
gdal_contour [\-\-help] [\-\-help\-general]
             [\-b <band>] [\-a <attribute_name>] [\-amin <attribute_name>] [\-amax <attribute_name>]
             [\-3d] [\-inodata] [\-snodata <n>] [\-f <formatname>] [\-i <interval>]
             [\-dsco <NAME>=<VALUE>]... [\-lco <NAME>=<VALUE>]...
             [\-off <offset>] [\-fl <level> <level>...] [\-e <exp_base>]
             [\-nln <outlayername>] [\-q] [\-p]
             <src_filename> <dst_filename>
.ft P
.fi
.UNINDENT
.UNINDENT
.SH DESCRIPTION
.sp
The \fBgdal_contour\fP generates a vector contour file from the input
raster elevation model (DEM).
.sp
The contour line\-strings are oriented consistently and the high side will
be on the right, i.e. a line string goes clockwise around a top.
.INDENT 0.0
.TP
.B \-\-help
Show this help message and exit
.UNINDENT
.INDENT 0.0
.TP
.B \-\-help\-general
Gives a brief usage message for the generic GDAL commandline options and exit.
.UNINDENT
.INDENT 0.0
.TP
.B \-b <band>
Picks a particular band to get the DEM from. Defaults to band 1.
.UNINDENT
.INDENT 0.0
.TP
.B \-a <name>
Provides a name for the attribute in which to put the elevation.
If not provided no elevation attribute is attached.
Ignored in polygonal contouring (\fI\%\-p\fP) mode.
.UNINDENT
.INDENT 0.0
.TP
.B \-amin <name>
Provides a name for the attribute in which to put the minimum elevation
of contour polygon. If not provided no minimum elevation attribute
is attached. Ignored in default line contouring mode.
.sp
New in version 2.4.0.

.UNINDENT
.INDENT 0.0
.TP
.B \-amax <name>
Provides a name for the attribute in which to put the maximum elevation of
contour polygon. If not provided no maximum elevation attribute is attached.
Ignored in default line contouring mode.
.sp
New in version 2.4.0.

.UNINDENT
.INDENT 0.0
.TP
.B \-3d
Force production of 3D vectors instead of 2D.
Includes elevation at every vertex.
.UNINDENT
.INDENT 0.0
.TP
.B \-inodata
Ignore any nodata value implied in the dataset \- treat all values as valid.
.UNINDENT
.INDENT 0.0
.TP
.B \-snodata <value>
Input pixel value to treat as \(dqnodata\(dq.
.UNINDENT
.INDENT 0.0
.TP
.B \-f <format>
Create output in a particular format.
.sp
New in version 2.3.0: If not specified, the format is guessed from the extension (previously was ESRI Shapefile).

.UNINDENT
.INDENT 0.0
.TP
.B \-dsco <NAME>=<VALUE>
Dataset creation option (format specific)
.UNINDENT
.INDENT 0.0
.TP
.B \-lco <NAME>=<VALUE>
Layer creation option (format specific)
.UNINDENT
.INDENT 0.0
.TP
.B \-i <interval>
Elevation interval between contours.
.UNINDENT
.INDENT 0.0
.TP
.B \-off <offset>
Offset from zero relative to which to interpret intervals.
.UNINDENT
.INDENT 0.0
.TP
.B \-fl <level>
Name one or more \(dqfixed levels\(dq to extract.
.UNINDENT
.INDENT 0.0
.TP
.B \-e <base>
Generate levels on an exponential scale: \fIbase ^ k\fP, for \fIk\fP an integer.
.sp
New in version 2.4.0.

.UNINDENT
.INDENT 0.0
.TP
.B \-nln <name>
Provide a name for the output vector layer. Defaults to \(dqcontour\(dq.
.UNINDENT
.INDENT 0.0
.TP
.B \-p
Generate contour polygons rather than contour lines.
.sp
New in version 2.4.0.

.UNINDENT
.INDENT 0.0
.TP
.B \-q
Be quiet.
.UNINDENT
.SH C API
.sp
Functionality of this utility can be done from C with \fI\%GDALContourGenerate()\fP\&.
.SH EXAMPLE
.sp
This would create 10\-meter contours from the DEM data in \fBdem.tif\fP and
produce a shapefile in \fBcontour.shp|shx|dbf\fP with the contour elevations
in the \fBelev\fP attribute.
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
gdal_contour \-a elev dem.tif contour.shp \-i 10.0
.ft P
.fi
.UNINDENT
.UNINDENT
.SH AUTHOR
Frank Warmerdam <warmerdam@pobox.com>, Silke Reimer <silke@intevation.de>
.SH COPYRIGHT
1998-2024
.\" Generated by docutils manpage writer.
.
